package com.feige.common.ex;


import com.feige.common.enums.ResponseEnum;
import lombok.Data;

/**
 * @author 飞哥
 * @date 2021/6/2 10:40
 */
@Data
public class KsdBusinessException extends ApiException {

    private Integer code;
    private String msg;

    public KsdBusinessException() {
        super(ResponseEnum.ERROR.getCode(), ResponseEnum.ERROR.getMsg());
        this.code = ResponseEnum.ERROR.getCode();
        this.msg = ResponseEnum.ERROR.getMsg();
    }

    public KsdBusinessException(ResponseEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
        this.msg = resultEnum.getMsg();
    }

    public KsdBusinessException(String message) {
        super(message);
        this.code = ResponseEnum.ERROR.getCode();
        this.msg = message;
    }

    public KsdBusinessException(Integer code, String message) {
        super(code, message);
        this.code = code;
        this.msg = message;
    }
}
